<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>  
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>

<style>
* {margin: 0 ;padding: 0;}
body,div{ margin: 0 ;padding: 0;}
</style>
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp">
<div class="infoboxp_top_bg"></div>
  <div class="infoboxp_top">
    <h6>添加简历</h6>
  </div>
  <div class="admin_table_border"> 
    <form action=""  method="post" onSubmit="return addresume()" class="layui-form">
	<input type="hidden" name="pytoken" id='pytoken' value="{yun:}$pytoken{/yun}">
		<table width="100%" class="table_form" style="background:#fff;">
			{yun:}if $row.uid==''{/yun}
			<tr>
				<td colspan='4'><div style="font-size:14px; padding-left:30px;">账户信息</div></td> 
			</tr>
			<tr>
			<th>登录账户：</th>
			<td colspan='3'><input type="text" name="username" id="username" class="input-text" value="" onblur="check_username();"></td>
			</tr>
			<tr class="admin_table_trbg">
			<th>密码：</th>
			<td colspan='3'><input type="password" name="password" id="password" class="input-text" value=""></td>
			</tr>
			<tr>
			<th>确认密码：</th>
			<td colspan='3'><input type="password" name="passconfirm" id="passconfirm" class="input-text" value=""></td>
			</tr>
			{yun:}/if{/yun}
	 
		<tr><td colspan='4'><div style="font-size:14px; padding-left:30px;">基本资料</div></td></tr>
      <tr class="admin_table_trbg">
        <th>用户姓名：</th>
        <td colspan='3'><input type="text" name="resume_name" id="resume_name" class="input-text" value="{yun:}$row.name{/yun}"></td>
      </tr>
	<tr  >
        <th>性 别：</th>
        <td colspan='3'>
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <div class="layui-input-inline">
                   {yun:}foreach from=$arr_data.sex key=j item=v{/yun}
                  <input id="sex{yun:}$j{/yun}" type="radio" {yun:}if $row.sex==$j{/yun}checked="checked"{yun:}/if{/yun} value="{yun:}$j{/yun}" name="sex" title="{yun:}$v{/yun}">
                  {yun:}/foreach{/yun} 
                 </div>
               </div>
            </div>
		</td>
      </tr>
       <tr class="admin_table_trbg">
		<th>教育程度：</th>
		<td colspan='3'>
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <div class="layui-input-inline">
                   <select name='edu'>
				{yun:}foreach from=$userdata.user_edu key=j item=v{/yun}
				<option value='{yun:}$v{/yun}' {yun:}if $row.edu==$v{/yun}selected="selected"{yun:}/if{/yun} >{yun:}$userclass_name[$v]{/yun}</option>
				{yun:}/foreach{/yun}
			</select> 
                 </div>
               </div>
            </div>
		</td>
	  </tr>
	 
	 <tr>
		<th>现居住地：</th>
		<td colspan='3'><input type="text" name="living" id="living" class="input-text" size="30" value="{yun:}$row.living{/yun}"></td>
	  </tr> 
       <tr class="admin_table_trbg">
		<th>工作经验：</th>
		<td colspan='3'>
            <div class="layui-form-item">
              <div class="layui-input-block">
                 <div class="layui-input-inline">
                   <select name='exp'>
				 {yun:}foreach from=$userdata.user_word key=j item=v{/yun}
				 <option value='{yun:}$v{/yun}' {yun:}if $row.exp==$v{/yun}selected="selected"{yun:}/if{/yun}>{yun:}$userclass_name[$v]{/yun}</option>
				 {yun:}/foreach{/yun}
			</select>
                 </div>
               </div>
            </div>
		</td>
	  </tr>
	   <tr >
        <th>出生年月：</th>
        <td colspan='3'>
            <input id="birthday" type="text"  size="10" value="{yun:}$row.birthday{/yun}" name="birthday" class="input-text">
		</td>
      </tr>
	  <tr class="admin_table_trbg">
		<th>手机：</th>
		<td colspan='3'><input type="text" name="moblie" id='telphone' onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" class="input-text" value="{yun:}$row.telphone{/yun}"></td>
	  </tr>
	  <tr >
			<th>邮箱：</th>
			<td colspan='3'><input type="text" name="email" id="email" class="input-text" value="{yun:}$row.email{/yun}"></td>
			</tr>
	   <tr class="admin_table_trbg">
		<th>自我评价：</th>
		<td colspan='3'><textarea id="description" class="infor_textarea " name="description" style="width: 339px; height: 64px;">{yun:}$row.description{/yun}</textarea></td>
	  </tr> 
		<tr class="admin_table_trbg" >
        <th width="120"></th>
        <td><input name='uid' type='hidden' value='{yun:}$row.uid{/yun}'><input class="admin_submit4" type="submit" name="next" value="&nbsp;下一步&nbsp;" /></td>
      </tr>
	   </table>
    </form>
 
</div>
</div>
<script language="javascript"> 
layui.use(['layer', 'form','laydate'], function(){
    var layer = layui.layer
    ,form = layui.form
    ,laydate = layui.laydate
    ,$ = layui.$;
	'{yun:}if !$row.birthday{/yun}'
		laydate.render({
			elem: '#birthday'
			,max: -5113,
			value: '1990-01-01'
		});
		'{yun:}else{/yun}'
		laydate.render({
			elem: '#birthday'
			,max: -5113,
		});
		'{yun:}/if{/yun}'
});
var weburl="{yun:}$config.sy_weburl{/yun}";
function addresume(){
	var username=$.trim($("#username").val());
	var password=$.trim($("#password").val());
	var passconfirm=$.trim($("#passconfirm").val());
	var resume_name=$.trim($("#resume_name").val());
	var sex=$.trim($("input[name='sex']:checked").val());
	var living=$.trim($("#living").val());
	var birthday=$.trim($("#birthday").val());
	var telphone=$.trim($("#telphone").val());
	var email=$.trim($("#email").val());
	var description=$.trim($("#description").val());
	var reg= /^[1][3456789]\d{9}$/;
	var myreg = /^([a-zA-Z0-9\-]+[_|\_|\.]?)*[a-zA-Z0-9\-]+@([a-zA-Z0-9\-]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;	
	'{yun:}if $row.uid==""{/yun}'
	if(username==''){parent.layer.msg("登录账户不能为空！",2,8);return false;}	
	if(password.length<6){parent.layer.msg("密码不能为空！",2,8);return false;}
	if(password!=passconfirm){parent.layer.msg("两次密码不一致！",2,8);return false;}
	'{yun:}/if{/yun}'
	if(resume_name==''){parent.layer.msg("用户姓名不能为空！",2,8);return false;}
	if(sex==''){parent.layer.msg("性别不能为空！",2,8);return false;}
	if(living==''){parent.layer.msg("现居住地不能为空！",2,8);return false;}
	if(birthday==''){parent.layer.msg("出生年月不能为空！",2,8);return false;}
	if(telphone==''){parent.layer.msg("手机号码不能为空！",2,8);return false;}else if(!reg.test(telphone)){
		parent.layer.msg("手机号码格式错误！",2,8);return false;
	}
	if(email==''){parent.layer.msg("邮箱不能为空！",2,8);return false;}else if(!myreg.test(email)){
		parent.layer.msg("邮箱格式错误！",2,8);return false;
	}
	if(description==''){parent.layer.msg("自我评价不能为空！",2,8);return false;}
} 
</script>
</body>
</html>